#include <57header.h>
void * threadFunc(void *arg){
   sleep(1);

   int *intnum = (int *)arg;
   printf("I am child thread \n" );
   //把参数当成是普通的8字节整型
   printf("child, val = %d\n", *intnum);
   return NULL;
}
void func(){
   int val = 1001;

   pthread_t tid;
   int ret = pthread_create(&tid,NULL,threadFunc,&val);
   THREAD_ERROR_CHECK(ret,"pthread_create");

   printf("function over \n" );
}
int main(){
   func(); // 调用函数

   printf("I am main thread \n" );
   sleep(2);
   return 0;
}
